package animator.phantom.controller;

/*
    Copyright Janne Liljeblad 2006,2007,2008

    This file is part of Phantom2D.

    Phantom2D is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Phantom2D is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Phantom2D.  If not, see <http://www.gnu.org/licenses/>.
*/

import java.awt.Dimension;

//--- Exending classes create strings that control video part of encode commands. These are created per video codec.
public class VideoCodec
{
	//--- Video codecs
	public static final String NO_OPTIONS = "No options"; 
	public static final String XVID = "xvid";
	public static final String X264 = "x264";
	public static final String LAVC_MPEG1 = "mpeg1/lavc";
	public static final String LAVC_MPEG2 = "mpeg2/lavc";
	public static final String MPEG1VIDEO = "mpeg1video";
	public static final String MPEG2VIDEO = "mpeg2video";
	public static final String LAVC_MPEG4 = "mpeg4/lavc";
	public static final String LAVC_MSMPEG4 = "msmpeg4/lavc";
	public static final String LAVC_MSMPEG4V2 = "msmpeg4v2/lavc";
	public static final String LAVC_REAL2 = "RealVideo2.0/lavc";
	public static final String LAVC_DV = "Sony DV/lavc";
	public static final String LAVC_FLV = "FlashVideo/lavc";
	public static final String THEORA = "Theora";
 	public static final String DV = "DV";
	
	private String vcodec;
	protected int bitrate;
	protected int encodeQuality;
	private int qualitySteps = 0;//--- 0,1 means quality not user settable, 2...n means that user can set value.

	public VideoCodec( String vcodec_ )
	{ 
		vcodec = vcodec_;
	}

	public VideoCodec( String vcodec_, int qualitySteps_ )
	{ 
		vcodec = vcodec_;
		qualitySteps = qualitySteps_;
	}

	public String getCommand(){ return vcodec +": video codec command not implemented"; }

	//--- Currently selected bitrate and quality made available to extending classes.
	protected static String bitrateString(){ return ( new Integer( CodecController.cVideoBitrate ) ).toString(); }
	protected static int bitrate(){ return CodecController.cVideoBitrate; }
	protected static int encodeQuality(){ return CodecController.encodeQuality; }
	public String getCodec(){ return vcodec; }
	public int getQualitySteps(){ return  qualitySteps; }

}//--- end class

